package com.tb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/root")
public class RootController {

    @GetMapping("/student")
    public ModelAndView student(ModelAndView mav) {
        //查询
        System.out.println("执行了学生查询");

        mav.setViewName("admin/student");
        return mav;
    }

    @GetMapping("/teacher")
    public ModelAndView teacher(ModelAndView mav) {
        //查询
        System.out.println("执行了教师查询");

        mav.setViewName("admin/teacher");
        return mav;
    }

    @GetMapping("/root")
    public ModelAndView root(ModelAndView mav) {
        //查询
        System.out.println("执行了管理查询");

        mav.setViewName("/admin/root");
        return mav;
    }



}
